package com.wpw.dream.annotations;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

public class AnnotationsTest {

	public static void test1() {
		Field[] fields = User.class.getDeclaredFields();
		
		List<String> list = new ArrayList<>();
		for (Field field : fields) {
			String type = "";
			if (Integer.class.isAssignableFrom(field.getType())) {
                type = "integer";
            } else if (String.class.isAssignableFrom(field.getType())) {
                type = "text";
            }
			list.add(type);
		}
		
		for (String string : list) {
			System.out.println(string);
		}
	}
	
	public static void main(String[] args) {
		test1();
	}
}
